package main

import (
	"fmt"
	"time"
)

// 检测 unix 时间戳单位
// 结果是秒
func main() {
	t1 := time.Now().Unix()
	fmt.Println("t1:", t1)
	time.Sleep(3 * time.Second)
	t2 := time.Now().Unix()
	fmt.Println("t2:", t2)
	fmt.Println("t2 - t1: ", t2-t1)
}
